<!DOCTYPE html>
<html lang="en"  xmlns:th="http://www.thymeleaf.org">
<head>

    <title>用户个人信息界面</title>

    <div th:replace="common/common.html :: common_resource"></div>

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="col-sm-12">
        <div class="ibox float-e-margins">
            <div class="ibox-title">
                <h5>用户个人信息</h5>
                <div class="ibox-tools">
                    <a class="collapse-link">
                        <i class="fa fa-chevron-up"></i>
                    </a>
                    <a class="dropdown-toggle" data-toggle="dropdown" href="user_me.html#">
                        <i class="fa fa-wrench"></i>
                    </a>
                </div>
            </div>
            <div class="ibox-content">
                <form th:action="@{/zjh/user/updateUser}" method="post" class="form-horizontal m-t" id="signupForm"
                      style="width:800px;" th:object="${user}">
                    <div class="form-group">
                        <label class="col-sm-3 control-label">账号：</label>
                        <div class="col-sm-8">
                            <input id="userId" name="userId" class="form-control" type="text" readonly="readonly" th:value="*{userId}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">姓名：</label>
                        <div class="col-sm-8">
                            <input id="fullName" name="fullName" class="form-control" type="text" readonly="readonly" th:value="*{fullName}">
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">原密码：</label>
                        <div class="col-sm-8">
                            <input id="password" name="password" class="form-control" type="password">
                            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 如需修改密码，请先输入原来的密码！</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">修改密码：</label>
                        <div class="col-sm-8">
                            <input id="password_edit" name="password_edit" class="form-control" type="password">
                            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 如需修改密码，请输入新密码！</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">确认密码：</label>
                        <div class="col-sm-8">
                            <input id="confirm_password" name="confirm_password" class="form-control" type="password">
                            <span class="help-block m-b-none"><i class="fa fa-info-circle"></i> 请再次输入您的新密码</span>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">联系电话：</label>
                        <div class="col-sm-8">
                            <input id="telephone" name="telephone" class="form-control" type="text" th:value="*{telephone}">
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-8 col-sm-offset-3">
                            <button style="width:120px;" class="btn btn-primary" type="submit">提交</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
</body>
<script type="text/javascript">
    window.onload=function(){
        console.log("参数: " + '[[${error}]]')
        switch ("[[${error}]]") {
            case "true":
                Message('success', '√ -修改成功!!!', 2000);
                break;
            case "twoNewPwdNone":
                Message('error', 'x -修改失败,两次输入的密码不一致!!!', 2000);
                break;
            case "newPwdNone":
                Message('error', 'x -修改失败,新密码 / 确认密码 输入为空!!!', 2000);
                break;
            case "oldPwdError":
                Message('error', 'x -修改失败,原密码错误或为空!!!', 2000);
                break;
            default:
                break;
        }

    };
</script>
</html>
